package com.fr.report.core.headerfooter;

import com.fr.base.core.serializable.Point2DSerializable;
import java.awt.geom.Point2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;

public abstract class AbstractHFPaintable
  implements HFPaintable
{
  private transient Point2D paintLocation;

  public AbstractHFPaintable()
  {
  }

  public AbstractHFPaintable(Point2D paramPoint2D)
  {
    setPaintLocation(paramPoint2D);
  }

  public Point2D getPaintLocation()
  {
    return this.paintLocation;
  }

  public void setPaintLocation(Point2D paramPoint2D)
  {
    this.paintLocation = paramPoint2D;
  }

  private void readObject(ObjectInputStream paramObjectInputStream)
    throws ClassNotFoundException, IOException
  {
    paramObjectInputStream.defaultReadObject();
    Object localObject = paramObjectInputStream.readObject();
    if (localObject != null)
      this.paintLocation = ((Point2DSerializable)localObject).getPoint2D();
  }

  private void writeObject(ObjectOutputStream paramObjectOutputStream)
    throws IOException
  {
    paramObjectOutputStream.defaultWriteObject();
    if (this.paintLocation != null)
      paramObjectOutputStream.writeObject(new Point2DSerializable(this.paintLocation));
  }
}